<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="js/mui.min.js"></script>
		<link href="css/mui.min.css" rel="stylesheet" />
		<link href="css/my.css" rel="stylesheet" />
		<style>
			h5 {
				margin: 5px 7px;
			}
			.white{
				color: #fff;
			}
			.title {
				margin: 35px 15px 10px;
				color: #fff;
			}
			.title+.content {
				margin: 10px 15px 35px;
				color: #bbb;
				text-indent: 1em;
				font-size: 14px;
				line-height: 24px;
			}
			*{
				-webkit-user-select: auto; 
			}
	</style>
	</head>
	<body>
		<!-- 侧滑导航根容器 -->
		<div class="mui-off-canvas-wrap mui-draggable">
			<!-- 菜单容器 -->
			<aside class="mui-off-canvas-right" id="menu">
				<div class="mui-scroll-wrapper">
					<div class="mui-scroll white">
						<div class="title">
							<h3>阅读设置</h3>
						</div>
						<div class="title">
							字体大小：<br>
							<button type="button" class="mui-btn mui-btn-primary  changeFont" style="margin-left: 3%;" fId="1">小</button>
							<button type="button" class="mui-btn mui-btn-primary  changeFont" style="margin-left: 3%;" fId="2">中</button>
							<button type="button" class="mui-btn mui-btn-primary  changeFont" style="margin-left: 3%;" fId="3">大</button>
							<button type="button" class="mui-btn mui-btn-primary  changeFont" style="margin-left: 3%;" fId="4">超大</button>
						</div>
						<div class="title">
							颜色设置：<br>
							<button type="button" style="margin-left: 6%;" class="mui-btn mui-btn-success" onclick="changeColor(1);">&nbsp;</button>
							<button type="button" style="margin-left: 6%;" class="mui-btn mui-btn-warning" onclick="changeColor(2);">&nbsp;</button>
							<button type="button" style="margin-left: 6%;" class="mui-btn mui-btn-royal" onclick="changeColor(3);">&nbsp;</button>
							<button type="button" style="margin-left: 6%;" class="mui-btn" onclick="changeColor(4);">&nbsp;</button>
							<span class="mui-icon mui-icon-plus" style="margin-left: 6%;font-size: 32px;" id="colorSetting"></span>
							<div style="margin-top: 1.625rem;display: none;" id="colorSelect">
								文字：<input type="color" id="textColor" style="width: 41px;" onchange="changeTextColor()"/>
								背景：<input type="color" id="bgColor" style="width: 41px;" onchange="changeBgColor()"/>
								<span class="mui-icon mui-icon-reload" style="margin-left: 6%;font-size: 32px;" id="resetColor"></span>
							</div>
						</div>
						<div class="title">
							字行间距：<br>
							<div class="mui-numbox" data-numbox-step='1' data-numbox-min='10' data-numbox-max='25'>
							  <button class="mui-btn mui-numbox-btn-minus" type="button">-</button>
							  <input class="mui-numbox-input" type="number" id="line" value="16" style="color: #000000;" readonly="readonly"/>
							  <button class="mui-btn mui-numbox-btn-plus" type="button">+</button>
							</div>
						</div>
						<div class="title">
							夜间模式：
							<div class="mui-switch" id="mySwitch">
								<div class="mui-switch-handle"></div>
							</div>
						</div>
						<!-- <div class="title">
							自动翻页：
							<div class="mui-switch" id="autoSwitch">
								<div class="mui-switch-handle"></div>
							</div>
						</div>
						<div style="display: none;" id="autoScroll" class="title">
							<div class="mui-input-row mui-input-range">
								<label>速度</label>
								<input type="range" min="18" max="88" id="autoSpeed" value="36">
							</div>
							<br>
						</div> --> 
						<div class="title mui-row">
							<div class="mui-col-sm-6 mui-col-xs-6">
								朗读模式：
								<div class="mui-switch" id="audioSwitch">
									<div class="mui-switch-handle"></div>
								</div>
							</div>
							<div style="display: none;" id="audio" class="mui-col-sm-6 mui-col-xs-6">
								播放/暂停：
								<div class="mui-switch mui-active" id="pauseSwitch">
									<div class="mui-switch-handle"></div>
								</div>
							</div>
						</div>
						<div style="display: none;" id="audio2" class="title">
							<div class="mui-input-row mui-input-range">
								<label>语速</label>
								<input type="range" min="5" max="30" id="range" value="10">
							</div>
						</div>
						<div class="title">
							书源选择：<br>
							<button type="button" id="fromType1" class="mui-btn">点击切换</button>
						</div>
						<br>
						<div class="mui-row title" align="center">
							<div class="mui-col-sm-6 mui-col-xs-6">
								<button type="button" id="star" data-loading-text="正在收藏" class="mui-btn mui-btn-warning"><span class="mui-icon mui-icon-star"></span>收藏此书</button>
							</div>
							<div class="mui-col-sm-6 mui-col-xs-6">
								<button type="button" id="index" class="mui-btn mui-btn-danger "><span class="mui-icon mui-icon-home"></span>返回目录</button>
							</div>
						</div>
					</div>
				</div>
			</aside>
			<!-- 主页面容器 -->
			<div class="mui-inner-wrap">
				<!-- 主页面标题 -->
				<header class="mui-bar mui-bar-nav bc2" id="header">
					<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
					<h1 class="mui-title" id="title"></h1>
					<a class="mui-action-menu mui-icon mui-icon-bars mui-pull-right" href="#menu"></a>
				</header>
				<div class="mui-content mui-scroll-wrapper bc" id="body2" style="line-height: 1.6;">
					<div class="mui-scroll">
						<div id="current" class="normal text font" style="margin: 1%;"></div>
						<div id="load" align="center" style="margin: 5%;">正在加载...</div>
					</div>
				</div>
				<div class="mui-off-canvas-backdrop" id="backdrop"></div>
			</div>
		</div>
	</body>
	<script src="js/config.js"></script>
	<script src="js/book.js"></script>
	<script src="js/audio.js"></script>
	<script type="text/javascript" charset="utf-8"> 
		var next;
		var flag = true;
		var bookName;
		var bookId;
		var bookNum;
		var deviceNum;
		var setting;
		var pageHeight = 720;
		var pageScrollSpeed = 36000;
		var autoScroll;
		var chapterTitle;
		var miss = false;
		mui.init({
			gestureConfig: {
				tap: true, //默认为true
				doubletap: true, //默认为false
				longtap: true, //默认为false
				swipe: true, //默认为true
				drag: true, //默认为true
				hold: false, //默认为false，不监听
				release: false //默认为false，不监听
			}
		});
		mui('#body2').scroll({
			deceleration: 0.006, //flick 减速系数，系数越大，滚动速度越慢，滚动距离越小，默认值0.0006
			scrollY: true, //是否竖向滚动
			scrollX: false, //是否横向滚动
			indicators: false, //是否显示滚动条
			bounce: true //是否启用回弹
		});
		mui.plusReady(function() {
			plus.device.setWakelock(true);
			//判断是否第一次使用
			var chapterFirst =  plus.storage.getItem("chapterFirst4");
			if(!chapterFirst){
				plus.storage.setItem("chapterFirst4","true");
				mui.alert('1.点击屏幕进行翻页\n2.长按屏幕切换全屏\n3.左滑打开功能菜单','小技巧','知道了',null,'div');
			}
			// plus.device.setWakelock(true); //屏幕常亮
			setting =  plus.storage.getItem("setting");
			if(setting){
				setting = JSON.parse(setting);
				changeFont(setting.font);
				changeColor(setting.color);
				if(setting.dark){
					dark(setting.dark);
				}
				document.getElementById("body2").style.lineHeight = setting.line / 10;
				mui('.mui-numbox').numbox().setValue(setting.line);
			}else{
				setting = {
					"font":2,
					"color":1,
					"dark":false,
					"line":16
				}
			}
			
			if(!setting.dark){
				var textColor = plus.storage.getItem("textColor");
				if(textColor){
					mui('.text').each(function() {
						this.style.color = textColor;
					});
					document.documentElement.style.setProperty('--textColor', textColor);
				}
				var bgColor = plus.storage.getItem("bgColor");
				if(bgColor){
					document.getElementById("body2").style.backgroundColor = bgColor;
				}
			}
			
			deviceNum = plus.storage.getItem("deviceNum");
			var self = plus.webview.currentWebview();
			var key = self.key;
			if (key == "") return;
			document.getElementById("title").innerHTML = self.bookName;
			bookName = self.bookName;
			bookId = self.bookId;
			bookNum = self.bookNum;
			var chapterNum = self.chapterNum;
			var fromType = plus.storage.getItem("fromType-" + bookId);
			var url = config.config.path + "/chapter/" + bookNum + "/" + chapterNum + "/" + fromType;
			if(self.chapterName){
				url = config.config.path + "/chapter/byTitle2.1?bookNum=" + bookNum + "&title=" + encodeURIComponent(self.chapterName) + "&fromType=" + fromType;
				chapterTitle = self.chapterName;
			}
			mui.ajax(url, {
				type: "GET",
				dataType: "json",
				success: function(result) {
					var code = result.code;
					if (code == 204 || code == 400) {
						// mui.toast('未找到相关信息', {
						// 	duration: 'short',
						// 	type: 'div'
						// });
						miss = true;
						document.getElementById("current").innerHTML = "";
						document.getElementById("load").innerHTML = "<br><h4>章节丢失了！</h4><br>您可以尝试以下操作:<br><br>"
							+ '<button type="button" id="fromType" class="mui-btn mui-btn-primary ">切换书源</button><br><br>';
						document.getElementById("fromType").addEventListener('tap', function() {
							mui.openWindow({
								url: "fromType.html",
								show: {
									autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
								},
								extras: { //自定义扩展参数，可以用来处理页面间传值
									bookId: bookId,
									bookNumber:bookNum
								},
								waiting: {
									autoShow: false, //自动显示等待框，默认为true
									title: '正在加载...' //等待对话框上显示的提示内容
								}
							});
						});
					} else if (code == 200) {
						miss = false;
						var temp = {
							'bookName':bookName,
							'chapterTitle':result.data.title,
							'chapterId':key,
							'bookId':bookId,
							'bookNum':bookNum,
							'chapterNum':chapterNum
						}
						
						plus.storage.setItem('agoInfo',JSON.stringify(temp));
						chapterTitle = result.data.title;
						mui.ajax(config.config.path + "/book-tag", {
							data: {
								"bookId": bookId,
								"bookName": bookName,
								"bookNumber": bookNum,
								"chapterId": key,
								"chapterNum": chapterNum,
								"chapterTitle": result.data.title,
								"deviceNum": deviceNum
							},
							dataType: 'json', //服务器返回json格式数据
							type: 'POST', //HTTP请求类型
							contentType: 'application/json;charset=utf-8',
							success: function(data) {}
						});
						var html = "<p><br><strong>" + result.data.title + "</strong><p>" + result.data.content;
						document.getElementById("current").innerHTML = html;
						next = result.data.next;
					}
				}
			});
			
			window.addEventListener('refresh', load);
		});
		
		function load(){
			var fromType = plus.storage.getItem("fromType-" + bookId);
			var url = config.config.path + "/chapter/byTitle2.1?bookNum=" + bookNum + "&title=" + encodeURIComponent(chapterTitle) + "&fromType=" + fromType;
			mui.ajax(url, {
				type: "GET",
				dataType: "json",
				success: function(result) {
					var code = result.code;
					if (code == 204 || code == 400) {
						// mui.toast('未找到相关信息', {
						// 	duration: 'short',
						// 	type: 'div'
						// });
						miss = true;
						document.getElementById("current").innerHTML = "";
						document.getElementById("load").innerHTML = "<br><h4>章节丢失了！</h4><br>您可以尝试以下操作:<br><br>"
							+ '<button type="button" id="fromType" class="mui-btn mui-btn-primary ">切换书源</button><br><br>';
						document.getElementById("fromType").addEventListener('tap', function() {
							mui.openWindow({
								url: "fromType.html",
								show: {
									autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
								},
								extras: { //自定义扩展参数，可以用来处理页面间传值
									bookId: bookId,
									bookNumber:bookNum
								},
								waiting: {
									autoShow: false, //自动显示等待框，默认为true
									title: '正在加载...' //等待对话框上显示的提示内容
								}
							});
						});
					} else if (code == 200) {
						miss = false;
						var temp = {
							'bookName':bookName,
							'chapterTitle':result.data.title,
							'chapterId':result.data.id,
							'bookId':bookId,
							'bookNum':bookNum,
							'chapterNum':result.data.num
						}
						plus.storage.setItem('agoInfo',JSON.stringify(temp));
						chapterTitle = result.data.title;
						
						mui.ajax(config.config.path + "/book-tag", {
							data: {
								"bookId": bookId,
								"bookName": bookName,
								"bookNumber": bookNum,
								"chapterId": result.data.id,
								"chapterNum": result.data.num,
								"chapterTitle": result.data.title,
								"deviceNum": deviceNum
							},
							dataType: 'json', //服务器返回json格式数据
							type: 'POST', //HTTP请求类型
							contentType: 'application/json;charset=utf-8',
							success: function(data) {}
						});
						var html = "<p><br><strong>" + result.data.title + "</strong><p>" + result.data.content;
						document.getElementById("current").innerHTML = html;
						next = result.data.next;
					}
				}
			});
			mui('.mui-off-canvas-wrap').offCanvas().close();
		}
		
		document.getElementById('range').addEventListener('input', function() {
			p.playbackRate = document.getElementById('range').value / 10;
			p2.playbackRate = document.getElementById('range').value / 10;
			setSpeed(document.getElementById('range').value / 10);
		});
		mui(".mui-numbox").on('tap', '.mui-btn', function() {
			document.getElementById("body2").style.lineHeight = document.getElementById('line').value / 10;
			mui('.text').each(function() {
				var y = document.getElementById("current").offsetTop;
				mui("#body2").scroll().scrollTo(0, -y, 100);
			});
			setting.line = document.getElementById('line').value;
			plus.storage.setItem("setting",JSON.stringify(setting));
		});
		document.body.querySelector('#body2').addEventListener("longtap", function() {
			if (flag) {
				document.getElementById("header").style.display = "none";
				flag = false;
			} else {
				document.getElementById("header").style.display = "block";
				flag = true;
			}
		});
		document.body.querySelector('#body2').addEventListener("tap", function() {
			pageScroll();
		});
		document.getElementById("mySwitch").addEventListener("toggle", function(event) {
			if (event.detail.isActive) {
				document.getElementById("colorSetting").style.display = 'none';
				document.getElementById("colorSelect").style.display = 'none';
				dark(true);
			} else {
				dark(false);
				document.getElementById("colorSetting").style.display = '';
				document.getElementById("colorSetting").className = 'mui-icon mui-icon-plus';
			}
		});
		document.getElementById("audioSwitch").addEventListener("toggle", function(event) {
			if (event.detail.isActive) {
				//朗读功能欠费不可用
				mui.toast("功能暂不可用");
				mui("#audioSwitch").switch().toggle();
				return;
				
				addText(document.body.querySelector('#current').textContent);
				play(next,document.getElementById('range').value / 10);
				document.getElementById("audio").style.display = 'block';
				document.getElementById("audio2").style.display = 'block';
			} else {
				return;
				document.getElementById("audio").style.display = 'none';
				document.getElementById("audio2").style.display = 'none';
				pause();
				clear();
			}
		});
		// document.getElementById("autoSwitch").addEventListener("toggle", function(event) {
		// 	if (event.detail.isActive) {
		// 		//开始翻页
		// 		autoScroll = self.setInterval("pageScroll()",pageScrollSpeed);
		// 		document.getElementById("autoScroll").style.display = 'block';
		// 	} else {
		// 		document.getElementById("autoScroll").style.display = 'none';
		// 		//清除翻页
		// 		autoScroll = window.clearInterval(autoScroll);
		// 	}
		// });
		// document.getElementById('autoSpeed').addEventListener('input', function() {
		// 	pageScrollSpeed = document.getElementById('autoSpeed').value * 1000;
		// 	autoScroll = window.clearInterval(autoScroll);
		// 	autoScroll = self.setInterval("pageScroll()",pageScrollSpeed);
		// });
		document.getElementById("pauseSwitch").addEventListener("toggle", function(event) {
			pause();
		});
		var moreFlag = true;
		mui("#menu").on('tap', '.changeFont', function() {
			changeFont(this.getAttribute("fId"));
		});

		document.querySelector('#body2').addEventListener('swipeup', function(e) {
			if(miss){
				//章节丢失时不自动加载下一章
				return;
			}
			
			//当前位置
			var scroll = mui('#body2').scroll();
			if ((scroll.scrollerHeight + scroll.y <= 1666) && moreFlag) {
				moreFlag = false;
				//写后台加载数据的函数
				nextChapter();
			}
		})
		document.querySelector('#body2').addEventListener('dragstart', function(e) {
			if(miss){
				//章节丢失时不自动加载下一章
				return;
			}
			//当前位置
			var scroll = mui('#body2').scroll();
			if ((scroll.scrollerHeight + scroll.y <= 1666) && moreFlag) {
				moreFlag = false;
				//写后台加载数据的函数
				nextChapter();
			}
		})
		
		
		document.getElementById("star").addEventListener('tap', function() {
			mui("#satr").button('loading');
			mui.ajax(config.config.path + "/collection", {
				data:{
					"bookId":bookId,
					"deviceNum":deviceNum,
					"bookNumber":bookNum
				},
				type: "POST",
				dataType: "json",
				contentType: 'application/json;charset=utf-8',
				success: function(result) {
					var code = result.code;
					if (code == 200) {
						mui.toast('收藏成功', {
							duration: 'short',
							type: 'div'
						})
					} else {
						mui.toast(result.message, {
							duration: 'short',
							type: 'div'
						})
					}
					mui("#star").button('reset');
				}
			});
		});
		
		document.getElementById("index").addEventListener('tap', function() {
			book(bookId);
		});

		document.getElementById("colorSetting").addEventListener('tap',function(){
			var settingFlag = document.getElementById("colorSetting").className;
			if(settingFlag == 'mui-icon mui-icon-plus'){
				document.getElementById("colorSetting").className = 'mui-icon mui-icon-close';
				document.getElementById('colorSelect').style.display = '';
				var textColor = plus.storage.getItem("textColor");
				var bgColor = plus.storage.getItem("bgColor");
				if(textColor){
					document.getElementById("textColor").value = textColor;
				}else{
					document.getElementById("textColor").value = getComputedStyle(document.documentElement).getPropertyValue('--DefaultTextColor');
				}
				if(bgColor){
					document.getElementById("bgColor").value = bgColor;
				}else{
					document.getElementById("bgColor").value = getComputedStyle(document.documentElement).getPropertyValue('--DefaultBgColor');
				}
			}else{
				document.getElementById("colorSetting").className = 'mui-icon mui-icon-plus';
				document.getElementById('colorSelect').style.display = 'none';
			}
		});

		document.getElementById("resetColor").addEventListener('tap',function(){
			resetColor();
		});

		function pageScroll(){
			if(miss){
				//章节丢失时不自动加载下一章
				return;
			}
			var scroll = mui('#body2').scroll();
			if ((scroll.scrollerHeight + scroll.y <= 1666) && moreFlag) {
				moreFlag = false;
				//写后台加载数据的函数
				nextChapter();
			}
			
			var y = scroll.y-pageHeight;
			if((y - 300)>= -scroll.scrollerHeight){
				scroll.scrollTo(0,y,666);
			}
		}

		function nextChapter() {
			if (next == "") {
				var table = document.body.querySelector('#load');
				table.innerHTML = "已到最后一章";
				return;
			}
			var fromType = plus.storage.getItem("fromType-" + bookId);
			mui.ajax(config.config.path + "/chapter/" + bookNum + "/" + next + "/" + fromType, {
				type: "GET",
				dataType: "json",
				success: function(result) {
					var code = result.code;
					if (code == 200) {
						var temp = {
							'bookName':bookName,
							'chapterTitle':result.data.title,
							'chapterId':result.data.id,
							'bookId':bookId,
							'bookNum':bookNum,
							'chapterNum':next
						}
						plus.storage.setItem('agoInfo',JSON.stringify(temp));
						chapterTitle = result.data.title;
						
						mui.ajax(config.config.path + "/book-tag", {
							data: {
								"bookId": bookId,
								"bookName": bookName,
								"bookNumber": bookNum,
								"chapterId": result.data.id,
								"chapterNum": next,
								"chapterTitle": result.data.title,
								"deviceNum": deviceNum
							},
							dataType: 'json', //服务器返回json格式数据
							type: 'POST', //HTTP请求类型
							contentType: 'application/json;charset=utf-8',
							success: function(data) {}
						});
						var html = "<p><br><strong>" + result.data.title + "</strong></p>" + result.data.content;
						var div = document.createElement('div');
						var table = document.body.querySelector('#current');
						table.id = "";
						div.id = "current";
						div.className = table.className;
						div.innerHTML = html;
						table.append(div);
						next = result.data.next;
						moreFlag = true;
					} else {
						var table = document.body.querySelector('#load');
						table.innerHTML = "已到最后一章";
					}
				}
			});
		}

		function changeColor(i) {
			var isActive = document.getElementById("mySwitch").classList.contains("mui-active");
			if (isActive) {
				dark(false);
				mui("#mySwitch").switch().toggle();
			}
			var color = "color" + i;
			// document.body.className = color;
			document.body.querySelector('#body2').className = "mui-content mui-scroll-wrapper " + color;
			setting.color = i;
			plus.storage.setItem("setting",JSON.stringify(setting));
		}

		function changeFont(i) {
			var font = "normal text font" + i;
			mui('.text').each(function() {
				this.className = font;
				var y = document.getElementById("current").offsetTop;
				mui("#body2").scroll().scrollTo(0, -y, 100);
			});
			setting.font = i;
			plus.storage.setItem("setting",JSON.stringify(setting));
		}

		function dark(dark) {
			if (dark) {
				// document.body.className = "color-dark";
				mui('.text').each(function() {
					this.className = this.className.replace("normal","color-dark");
				});
				document.body.querySelector('#title').className = "mui-title color-dark";
				document.getElementById("body2").style.backgroundColor = '';
				document.body.querySelector('#body2').className = "mui-content mui-scroll-wrapper color-dark";
				document.body.querySelector('#header').className = "mui-bar mui-bar-nav color-dark";
				document.getElementById("mySwitch").className = document.getElementById("mySwitch").className + ' mui-active';
			} else {
				// document.body.className = "";
				mui('.text').each(function() {
					this.className = this.className.replace("color-dark","normal");
				});
				document.body.querySelector('#title').className = "mui-title";
				var color = plus.storage.getItem("bgColor");
				if(color){
					document.getElementById("body2").style.backgroundColor = color;
				}else{
					document.body.querySelector('#body2').className = "mui-content mui-scroll-wrapper bc";
				}
				document.body.querySelector('#header').className = "mui-bar mui-bar-nav bc2";
			}
			setting.dark = dark;
			plus.storage.setItem("setting",JSON.stringify(setting));
		}
	
		function changeTextColor(){
			var color = document.getElementById("textColor").value;
			mui('.text').each(function() {
				this.style.color = color;
			});
			document.documentElement.style.setProperty('--textColor', textColor);
			plus.storage.setItem("textColor",color);
		}
		
		function changeBgColor(){
			var color = document.getElementById("bgColor").value;
			document.getElementById("body2").style.backgroundColor = color;
			plus.storage.setItem("bgColor",color);
		}
		
		
		function resetColor(){
			mui('.text').each(function() {
				this.style.color ='';
			});
			document.getElementById("body2").style.backgroundColor = '';
			plus.storage.removeItem("textColor");
			plus.storage.removeItem("bgColor");
			document.documentElement.style.setProperty('--textColor', getComputedStyle(document.documentElement).getPropertyValue('--DefaultTextColor'));
			changeColor(5);
			document.getElementById("textColor").value = getComputedStyle(document.documentElement).getPropertyValue('--DefaultTextColor');
			document.getElementById("bgColor").value = getComputedStyle(document.documentElement).getPropertyValue('--DefaultBgColor');
		}
		
		document.getElementById("fromType1").addEventListener('tap', function() {
			mui.openWindow({
				url: "fromType.html",
				show: {
					autoShow: true //页面loaded事件发生后自动显示，默认为true/页面动画持续时间，Android平台默认100毫秒，iOS平台默认200毫秒；
				},
				extras: { //自定义扩展参数，可以用来处理页面间传值
					bookId: bookId,
					bookNumber:bookNum
				},
				waiting: {
					autoShow: false, //自动显示等待框，默认为true
					title: '正在加载...' //等待对话框上显示的提示内容
				}
			});
		});
	</script>
</html>
